﻿using System;
using Yaml.Presentation;

namespace Yaml.Serialization.Events {
    public abstract class Event {
        Mark start = null;
        Mark end = null;

        public override String ToString() {
            return "#<" + this.GetType().Name + ">";
        }

        /// <summary>
        /// Set the position of this event.
        /// </summary>
        public void SetMarks(Mark start, Mark end) {
            this.start = start;
            this.end = end;
        }

        /// <summary>
        /// The start position of this Event
        /// </summary>
        public Mark Start {
            get { return this.start; }
        }

        /// <summary>
        /// The end position of this Event
        /// </summary>
        public Mark End {
            get { return this.end; }
        }
    }
}
